/**
 * 
 */
package gov.trasport.online.user.login.controller;

import gov.trasport.online.employee.model.Employee;
import gov.trasport.online.login.model.UserLogin;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author Rajasekhar Burpalli
 *
 */
@Controller
public class UserLoginController {

	/**
	 * 
	 */
	public UserLoginController() {
		// TODO Auto-generated constructor stub
		
	}

	@RequestMapping("/loginGateway")
	public ModelAndView displayLoginGatewayFrom(){
		System.out.println("loginGateway");
		ModelAndView mv = new ModelAndView("UserLogin");
		mv.addObject("loginEntity", new UserLogin());
		return mv;
	}
	
	@RequestMapping("/validateUserLogin")	
	public ModelAndView validateUserLogin(@ModelAttribute UserLogin e){
		System.out.println("loginGateway");
		System.out.println("=====Username:"+e.getUserName()+"====password:"+e.getPassword());
		
		ModelAndView mv = new ModelAndView("UserLogin");
		mv.addObject("loginEntity", new UserLogin());
		System.out.println("=====");
		return mv;
	}

	@RequestMapping("/userRegistrationGateway")	
	public ModelAndView userRegistrationGatewayForm(){
		System.out.println("userRegistrationGateway");
		ModelAndView mv = new ModelAndView("userRegistrationForm");
		mv.addObject("loginEntity", new UserLogin());
		System.out.println("=====");
		return mv;
	}
	
	@RequestMapping("/userHelp")	
	public ModelAndView userHellp(){
		System.out.println("userHelp");
		ModelAndView mv = new ModelAndView("userHelp");
		mv.addObject("loginEntity", new UserLogin());
		System.out.println("=====");
		return mv;
	}

	
	
}
